let config = (function () {
  let ENV = 'DEV'; // 环境配置 必填项。【DEMO,DEV,TEST,PROD 】 【本地例子，开发，测试，正式】
  let projectName = '_ai_merchant_'; // 必填项 项目的名字，用来区分多个项目，尤其是在cookie
  let version = '1.0.2.1';
  let PARAM = {
    'DEMO': {
      API_BASE_URL: ''
    },
    'DEV': {
      BASE_URL: 'http://192.168.52.57:8080/',
      API_BASE_URL: 'http://192.168.52.57:8080/',
      API_WS:'ws://192.168.52.57:8181/',
      UPLOAD_BASE_URL: 'http://192.168.52.57:8080/upload',
      IMG_URL:'http://192.168.52.57:8080/public/'
    },
    'TEST': {
      BASE_URL: 'https://www.aicaresyou.com/',
      API_BASE_URL: 'https://www.aicaresyou.com/api/',
      API_WS:'wss://www.aicaresyou.com/ws',
      UPLOAD_BASE_URL: 'https://www.aicaresyou.com/api/upload',
      IMG_URL:'https://www.aicaresyou.com/api/public/'
    },
    'PROD': {
      BASE_URL: 'https://www.aicaresyou.com/',
      API_BASE_URL: 'https://www.aicaresyou.com/api/',
      API_WS:'wss://www.aicaresyou.com/ws',
      UPLOAD_BASE_URL: 'https://www.aicaresyou.com/api/upload',
      IMG_URL:'https://www.aicaresyou.com/api/public/'
    }
  };



  let apiName = { // 接口名字
    aliUploadToken: 'aliyun/getSignature',
    test: 'BizConfig/read/font_merchant',  // 创建pageUI
  };

  let cookie = {
    user: projectName + 'user',
    loginBack: projectName +'loginBack',
    currentTerminal: projectName + 'currentTerminal',
    visitGuide:projectName + 'visitGuide',
    tagsChoose:projectName + 'tagsChoose',
    pointChoose:projectName + 'pointChoose',
    terminalChoose:projectName + 'terminalChoose',
    resChoose:projectName + 'resChoose',
    wxAuthMobileInfo:projectName + 'wxAuthMobileInfo',
    wxAuthUserInfo:projectName + 'wxAuthUserInfo',
    terminalInfo:projectName + 'terminalInfo',
    uiType:projectName + 'uiType',
  };

  let tabList = ['device_list','mine'];

  var tabBar = {
    basic:[{
      "pagePath": "device_list",
      "text": "设备",
      "iconPath": "../images/terminal.png",
      "selectedIconPath": "../images/terminal_fill.png"
    },
    {
      "pagePath": "mine",
      "text": "我的",
      "iconPath": "../images/mine.png",
      "selectedIconPath": "../images/mine_fill.png"
    }],
    normal:[
      {
        "pagePath": "device_list",
        "text": "设备",
        "iconPath": "../images/terminal.png",
        "selectedIconPath": "../images/terminal_fill.png"
      },
      {
        "pagePath": "mine",
        "text": "我的",
        "iconPath": "../images/mine.png",
        "selectedIconPath": "../images/mine_fill.png"
      }
    ]
  }
  var canvasFnOpts = {
    local:[15,17,0,15,0,16,16,18,0,1,1,2,1,5,1,8,2,3,4,3,5,6,6,7,8,9,8,12,9,10,10,11,11,24,11,22,22,23,12,13,13,14,14,21,14,19,19,20],
    server:null
  }

  return {
    ENV: ENV,
    PARAM: PARAM[ENV],
    cookie:cookie,
    apiName: apiName,
    version:version,
    tabList:tabList,
    switchTabParam:null,
    tabBar:tabBar,
    imgResize:'x-oss-process=image/resize,l_200,m_mfit',
    canvasFnOpts:canvasFnOpts
  }
})();

export default config;
